package com.ww.service;

import com.ww.dao.ArticleDao;
import com.ww.model.Article;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * Created by admin on 2017/9/12.
 */
@Service
@Transactional
public class ArticleServiceImpl implements ArticleService {

    @Autowired
    private ArticleDao articleDao;

    public Article getById(String id) {
        return articleDao.getById(id);
    }

    public void save(Article a) {
        articleDao.save(a);
    }

    public void update(Article a) {
        articleDao.update(a);
    }

    public void delete(Article a) {
        articleDao.delete(a);
    }
}
